home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
551-575
/
disk_567
/
autocli
/
autocli.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
31KB
|
677 lines
AutoCLI V2.06 Nov 1991 by Nic Wilson
------------------------------------
Nic Wilson Software
138d South Street
TOOWOOMBA Queensland 4350
Australia
Phone (076) 358539 Home Voice only
(076) 358384 Work or Fax
(076) 358522 Work Voice only
EMAIL {cbmvax|cbmehq}!cbmaus!wilson!nic@uunet.uu.net
Written in 100% Assembler using Devpac Amiga V2.14 on an
Amiga 3000.
AutoCLI is ShareWare. I have not disabled it in any way.
This is so you can get full benefit immediately. If you use
it then please send a small donation and help me to bring more
programs to the Amiga. Suggested donation is $20.00 American.
Donations will be accepted in any currency. Mastercard, Visa
or Bankcard can also be accepted by mail or by telephone.
Overseas users, please do not send personal or Bank cheques.
Easiest form of paymentfrom overseas is cash funds or American
Express Travellers Cheques. Disks are an acceptable form of
payment.
Permission is hereby granted to distribute this program on the
condition that no profit is gained gained from its distribution.
All document files must accompany it and remain unchanged. If the
document files are crunched, then a suitable de-cruncher must also
be supplied with them that works on ALL model Amigas. It may not
be distributed on those so called 'copyright' non distributable PD
disks.
Please send any bug reports or ideas to the address at the top of
this file.
Commercial companies wishing to distribute, may contact me at the
address at the top of this file.
I not only write commercial programs, but as you see we write
non-commercial too. If you like this program and you use it,
then help me by sending a donation to the address below.
This program is now fully tested an all Amiga models including
the A3000. Fully testing is also done with 'enforcer' a debugging
program that uses the MMU to look for and display invisible bugs.
I have found this program to be a worthwhile tool for programming.
MMU stands for Memory Management Unit and is found as a seperate
chip on 68020's and labeled 68851 and is internal to a 68030/68040.
Enforcer comes as one of the tools under V2.0x Developers disks,
and is also available on Fish Disk #474.
NEW DOC FILE FROM V2.00
-----------------------
Bugs and history has now been moved to a seperate file called
'autocli.history.doc'. This allows for less cluttered docs.
************************************************************************
ABSOLUTELY IMPORTANT WHEN UPDATING TO A NEWER VERSION OF AutoCLI
----------------------------------------------------------------
There MUST only be one copy of AutoCLI in the current path.
Otherwise the special re-launcher code may find an older version
first and install it instead of the one you just loaded.
************************************************************************
KNOWN BUGS OR CONFLICTS
-----------------------
Problems have been encountered with non standard versions of
the 'RUN' command. This command is called by dos.library's
'execute' function. If you have problems with the Amiga crashing
when a CLI is popped up then make sure the 'run' command is
standard. The one to use is the one you can find on a standard
Workbench disk. It is not recommended that ARP Library commands
be used. I have found them to be the source of many problems.
SUGGESTIONS
-----------
If AutoCLI does not have your favourite function, or you can think
of any improvements, then write and tell me. The very best
suggestions receive a FREE copy of my commercial NoVirus program
or AddMenu Plus Icons. Include your telephone or fax number so
we may contact if you are a winner.
NIC'S PROGRAM SUMMARY
---------------------
This program was written because of problems with the similar
program I had been using called 'popcli'. Popcli crashed if used
under WorkBench/KickStart 2.0, and if used on a PAL Amiga to open
a CLI window with a vertical size greater than 200 lines, it did
not open if your Amiga decides to start in NTSC mode. Popcli also
seems to waste CPU time when waiting and doesn't allow you to
remove it from memory without crashing or a reboot. AutoCLI will
overcome all of the above problems and has many added features
equivalent to other programs around, but uses much less CPU time.
The biggest problem with all the others, is that they lose the
Current directory, stack and path. AutoCLI retains all this
including the current directory when the program was launched,
it will place you in this directory every time you open a CLI or
Shell.
FEATURES
--------
* Kickstart / Workbench 1.2, 1.3, 2.0x compatible
* Compatible with A500, A1000, A2000, A2500, A3000
* New Anti-Virus Event handler monitors your memory
* Default or custom CLI / Shell windows
* Default windows open to 1 pixel less than current screen
* Automatically checks and warns of restart vector changes
* 20 Function key scripts
* Update completely once running
* Asynchronous options window allows modification while running
* Option window can be opened in your specified location
* Active window to front or point to front options
* Screen & window shuffle option
* Screen blanking after time period option with spline patterning
* Mouse blanking on key press or time option
* Mouse acceleration and button swap options
* Auto Window activation on a key press and mouse position option.
* Function to swap mouse buttons for left handed users
* Selectable task priority
* No CPU time wastage
* 100% machine code
* Freely distributable
* Plus much much more...
PROGRAM USAGE FOR INSTALLING AutoCLI
------------------------------------
AutoCLI [<optional switches>] [<optional seconds>] [<optional command>]
YOU MUST NOT USE RUN or RUNBACK when launching AutoCLI. It will
return the command line prompt and allow the window it was launched
from to close, when an 'ENDCLI' command is given. It still retains
the directory it was launched from and does not lose the current
path or stack. This means when a CLI is popped up, it will
default to the directory that was current, when AutoCLI was
launched. The path and stack that was set, will still be valid.
The program is mainly designed to be used in your startup-sequence
(or user-startup in V2.0x), so you will always have a CLI or Shell
window available very conveniently. AutoCLI MUST reside in your
C: directory or be in a directory in the path.
OPTIONAL SWITCHES
-----------------
The following switches do not have to be given in any particular
order, but must all be before the optional seconds and command
parameters. All options default to OFF and must be enabled with
a switch.
Any of these options can be modified after launch, by using the
Option Window provided. (see OPTIONS WINDOW below)
-f<r>[n]
This switch enables function key trapping. When your qualifier
(see below) is held down and a function key pressed, the
program will execute a script file in the assigned S:
directory with a filename of autocli.f1 to autocli.f10.
This file must be a normal script (eg. startup-sequence).
The extra two switches <r> and [n] are for changing the qualifier
for the extra 10 keys giving a total of 20 function key scripts.
The optional 'r' parameter forces the qualifier for these 10 to
be the right hand key of 'n'. The 'n' parameter tells AutoCLI
which key you want as the qualifier for these extra 10 function
key scripts. If none of these are given the it will default to
the Right Amiga key. The other choices are as shown below in the
example. Filenames for these extra 10 must be:- autocli.e1 to
autocli.e10. These files as above must be in the assigned S:
directory and be a normal script files.
EXAMPLES
-f Gives extra 10 and the second qualifier is Right Amiga
-frd Gives extra 10 and the second qualifier is Right Amiga (AS FOR DEFAULT)
-fra Gives extra 10 and the second qualifier is Right Alt
-frs Gives extra 10 and the second qualifier is Right Shift
-fc Gives extra 10 and the second qualifier is Control
-fd Gives extra 10 and the second qualifier is Left Amiga
-fa Gives extra 10 and the second qualifier is Left Alt
-fs Gives extra 10 and the second qualifier is Left Shift
Please note that the second qualifier MUST be different to the
normal qualifier key that you have chosen. If you select the
same then the AutoCLI will display an error window.
*************************************************************
FILENAMES FOR FIRST 10 SCRIPTS:- S:autocli.f1 to S:autocli.f10
FILENAMES FOR EXTRA 10 SCRIPTS:- S:autocli.e1 to S:autocli.e10
*************************************************************
WINDOW TO FRONT
---------------
-w[n]
This switch enables the window to front option. The optional
parameter [n] selects the action required to bring it to the
front. 0 = use keyboard, 1 = use mouse. To use keyboard
select the window you want at the front by clicking the left
mouse inside the window and then hold your qualifier key
(see below) and pressing the Left ALT key.
To use the mouse simply place the mouse in the window you
want at the front and the window will immediately appear at
the front. Both can be temporarily disabled via the option
window.
EXAMPLES
for keyboard -w0 or -w
for mouse -w1
SCREEN SHUFFLE
--------------
-n[n]
This switch enables the screen shuffle option. Two optional
parameters for [n] are 1 or 2. 1 enables or disables the mouse
activated part of the screen shuffling. If you want the mouse
activation then you can leave this parameter off (eg. -n)
If you want to disable this feature in case of conflictions with
other programs such as DirectoryOpus then use -n1. The third
option is 2 which enables the mouse activated part as -n does,
but stops the screen being activated when brought to the front.
EXAMPLES
for keyboard, mouse & screen activation -n
for keyboard only & screen activation -n1
for keyboard, mouse & no screen activation -n2
To use this function, hold down your qualifier key and use the
cursor up or down keys to rotate all screens in opposite
directions.
If you prefer you can hold down the left mouse button and
click the right button to shuffle the screens (if enabled).
Screen shuffle is different to the standard LEFT AMIGA N & M.
These standard keys only swap between the front and rear most
screens.
WINDOW SHUFFLE
--------------
-m
This switch enables the window shuffle option. To use this
function, hold down your qualifier key and use the cursor
left or right keys. This will move the front most window to
the back or the back most window to the front respectively.
The window shuffle always occurs on the screen that is at
the front. This allows you to easily move between windows
and screens by using the qualifier and all the cursor keys
MOUSE ACCELERATION
------------------
-q[n]
This switch enables mouse acceleration. The optional parameter
[n] is a speed from 1 to 3. Speed 1 will multiply all mouse
movements by a factor of 2. Speed 2 will multiply by a factor of
4, and speed 3 is a special case, it will multiply by the amount
the mouse actually moved, this mode was preferred by a lot of
users because it will give a small acceleration if the mouse is
moved a short distance, increasing more and more the further and
faster you move the mouse. This function works in conjunction
with mouse speed under preferences, so this can also be changed to
find the best possible combination that you like. If this second
paramter is not given then it will default to speed 1.
EXAMPLES
for 4 times speed up the switch should be -q2
for default speed of 2 times it should be -q
for automatic linear speed increase -q3
TASK PRIORITY (NOT RECOMMENED TO BE CHANGED)
------------- ------------------------------
-p[n]
This switch allows you to change the priority of AutoCLI.
Without this switch it will default to 21. Valid values
for [n] are 0 - 21, bad values will cause the default value
to be used.
EXAMPLES
for a priority of 0 the switch should be -p0
for a priority of 20 the switch should be -p20
NOTE
If the priority is changed from 21, some functions may not
work correctly. Use with caution.
AUTO WINDOW ACTIVATION
----------------------
-k
This switch enables auto window activation. If enabled this
function will activate any window the mouse is currently in
when a key is pressed, unless a string gadget is currently active
in another window. It will still work even if another screen is
at the front, and you have dragged it down and placed the mouse
over a window on the screen behind.
MOUSE MOVEMENT LOCKING & FREEZING
---------------------------------
-l or -lr
TO TEMPORARILY LOCK X or Y MOVEMENTS
This switch allows the mouse movements to be frozen in vertical,
horizontal or both directions, by holding down a key or keys. A
freeze mouse toggle is also supported. If the CONTROL key is
held down the horizontal movements are frozen. If the LEFT ALT
key is held down then the vertical movements are frozen. If both
are held down then all movements are frozen. When either of these
keys are released then movements continue in that direction.
If the CONTROL and LEFT ALT keys conflict with your first or
second qualifier keys (see -s -c -a, -f) then use the -lr switch
instead. The lock keys will change to RIGHT SHIFT for horizontal
and RIGHT ALT for vertical. These two modes can be toggled from
the option window.
TO FREEZE ALL MOVEMENTS OF MOUSE FOR EXTENDED PERIOD
If you want to freeze the entire mouse movements for an extended
period (EG. Over the start gadget of a copy program etc.) then
hold down your first qualifier key and press the right mouse
button. This will freeze the mouse permanently until the same
combination (first qualifier/right mouse) is received again.
If mouse blanking is enabled, the mouse will still blank while
frozen. Moving the mouse will cause it to be re-displayed yet
no movement will occur.
MOUSE BLANKING
--------------
-b
This switch enables mouse blanking. When any key is pressed,
or if no mouse movement is detected within 30 seconds the mouse
pointer will be blanked. As soon as the mouse is moved the
pointer will be returned immediately. This overcomes the annoying
habit of the pointer always being in the way while typing.
LEFTY MOUSE
-----------
-e
This switch electrically exchanges the left and right hand buttons
on the mouse. All programs that use the mouse correctly will
work. If the mouse is checked by hardware then the swap will
not occur. This switch can be toggled from the option window.
QUALIFIER KEY
-------------
-s -c -a
The default qualifier key is the LEFT AMIGA but this can be
changed with a switch. The -s switch changes the qualifier
key to the SHIFT key. The -c switch changes it to the CONTROL
key, and the -a switch changes it to the ALT key. To use the
default key (LEFT AMIGA) then don't use any of these three
switches. Note that this qualifier key is also the same for
the autocli function as well.
-r
The above qualifier is, by default, the key on the LEFT side
of the keyboard. To change this to the RIGHT side, use thi
switch.
SCREEN BLANKING SECONDS AND SPLINE PATTERNING OPTIONS
-----------------------------------------------------
OPTIONAL SECONDS
----------------
This is an optional time (in seconds) to blank the screen
when no user input is detected. The default is off, so if
blanking is not wanted then do not give a time at all. When
the screen has been blanked, it can be turned on again by
touching any key or moving the mouse. This number must be
after ALL of the switches including those below that are
used in conjunction with this. It has been left this way
to remain compatible with older versions.
You can blank the screen immediately as if the time had expired
by pressing holding your first qualifier key and pressing your
second qualifier key.
-lc[n]
This switch is used in conjunction with screen blanking,
See 'OPTIONAL SECONDS' and -lf below. This switch changes
the number of lines the spline patterning routine draws.
The 'n' parameter can have a value between 2 - 100 or 0. If
this switch is not given then a default value of 65 will be
used. If you do not want spline patterning, and prefer a
blank black screen when blanked the use 0 as the parameter
(IE. -lc0). To change the speed of the splines see the
-lf parameter. If a number too large is given for 'n' then
it will default to 100, similarly if a number too small is
given then it will default to 2.
-lfb
This double switch is used in conjunction with screen blanking.
The switch has two parts the 'f' part and 'b' part. You may
use one or both of them.
If the 'f' part is given then the spline patterning will go
as fast as it will run on your Amiga. If the 'f' part is
not given it will be timed to go about the same speed on all
Amiga's and will be slower.
If the 'b' part is given then the blanking screen will be
2 bitplanes instead of 1. 2 bitplanes allows more colours
to be displayed on the spline screen at once. In 2 bitplane
mode the routine will use around 120K of chip memory, so
only select this mode if you have that amount free.
1 bitplane mode only allows a single colour to be used at
one time to draw the splines (although it will cycle to
different colours). This requires only half the amount
of chip memory and should work alright on all Amiga's, unless
your chip memory usage is very large.
If you have chosen 2 bitplanes and screen blanking doesn't
seem to work try removing the 'b' and try again.
EXAMPLE
-lf speed up splines and use 2 colours (1 + background)
-lb slower splines and use 4 colours (3 + background)
-lfb speed up splines and use 4 colours (3 + background)
-x[n] This switch allows you to specify the initial horizontal
co-ordinate of the option window. The value of [n] must
be between 0 and (screen width - 272 ). If an incorrect value
is given it will be modified to bring the window inside
the screen area. If the window is dragged while open,
subsequent openings will will be at this new position.
EXAMPLE
-x100 Left edge of the option window is at pixel 100
For a screen that is 640 pixels wide the maximum number
would be (screen width - 272) = (640 - 272) = 368
-y[n] This switch allows you to specify the initial vertical
co-ordinate of the option window. The value of [n] must
be between 0 and (screen height - 200 ). If an incorrect value
is given it will be modified to bring the window inside
the screen area. If the window is dragged while open,
subsequent openings will will be at this new position.
EXAMPLE
-y50 Top edge of the option window is at pixel 50
For a screen that is 256 pixels high (EG. PAL HighRes) the
maximum number would be (screen height - 200) = (256 - 200) = 56
For a screen that is 200 pixels high (EG. NTSC HighRes) the
maximum number would be (screen height - 200) = (200 - 200) = 0
USAGE DISPLAY
-------------
?
If the only switch is a single question mark, then AutoCLI
will display a USAGE string on the current CLI window.
It will not install or remove itself.
REMOVING AutoCLI from the CLI
-----------------------------
remove
This switch should be used on its own. It will signal
the current version of AutoCLI to shut down and remove
itself. Whenever it attempts this removal, a success
or failure message will be displayed on the CLI window.
To remove from Workbench, see OPTIONS WINDOW.
WARNING WINDOW
--------------
The event handler constantly checks the restart vectors against
values that were there when AutoCLI was first launched. These
vectors are often modified by viruses in order to survive a
reboot. If this happens during normal operation, (IE. file
virus gets launched) then AutoCLI will open a small warning
window and ask you if you wish to replace them with their
original values or leave them. For example mounting RAD:
will change these vectors the first time is it accessed.
You would answer NO to the question, AutoCLI will then accept
these changes as OK.
OPTIONS WINDOW
--------------
This function is always available, even if function key scripts
(-f) is turned off. It is accessed by holding your first qualifier
key and pressing HELP. A window will open on the front most
screen with gadgets set with your current options. This window
is asynchronous to the main program. This means that all AutoCLI
functions will continue to operate if the options window is open.
Click on the gadgets to turn functions on or off. Some fuctions
have more than one setting and each click of its particular
gadget will cycle that gadget through all possible modes. The
text string beside the gadget will also change to help you
remember the function of each particular setting.
The command string that is executed when first qualifier ESC is
pressed will be displayed in a string gadget called 'Command
String'. If you are using Auto sizing CLI/Shell windows, this
string gadget will be ghosted. To use a modiified string or
replace it completely, click the 'AUTO' gadget. The gadget will
now show 'MANUAL' and the string gadget will be available and be
selected for your input. You can always return to Auto sizing by
re-enabling the 'AUTO' mode.
Screen blanking time can be changed by clicking in the gadget
and changing it accordingly. If you turn screen blanking on, but
give no time, then a default time of 500 seconds will be set.
The number of lines to draw in the spline patterning code can
be changed by clicking in the gadget and changing it accordingly.
if an incorrect value is given then the closest correct value will
immediately appear in the gadget. A totally incorrect response
will force a value of 65 to be placed in the gadget.
At the bottom of the window are two gadgets, 'OK' and 'REMOVE'.
The remove gadget will remove AutoCLI from memory completely. The
'OK' gadget will set the new options you have made.
OPTIONAL COMMAND (command run when 'Qualifer ESC' is pressed)
----------------
If no optional command is given then AutoCLI will use a default
command. This default command is, AutoCLI will launch and wait
for your qualifier key and ESCAPE to be pressed. When this event
occurs AutoCLI will open a CLI window 1 pixel less than the size
of the WorkBench Screen at the time it is opened. So if
resolution mode is changed AutoCLI will notice the change. If
NEWCON: is available, a Shell window will open instead of a CLI
window and if running under V2.0 of Workbench, the window will
have a close gadget.
If an optional command is given, AutoCLI will execute that command
in preference to the default CLI/SHELL window when your qualifier
key and ESCAPE is pressed (see EXAMPLES). This allows custom
commands or custom size CLI/Shell windows to be used. Note that
if AutoCLI is already in memory it will update itself to to
reflect all parmeters given.
The Optional Command can be modified after launch within the option
window. Click the gadget beside the 'Command String' string gadget
until it shows 'MANUAL', the string gadget will be activated for
you. The command can then be modified and the program will use
this new string. The default string can always be re-selected by
clicking the gadget until it shows 'AUTO'.
UPDATING AutoCLI ONCE ALREADY RUNNING
-------------------------------------
Most changes can be made via the options window, or you can launch
again from the CLI and supply a whole new set of parameters and it
will completely update itself.
EXAMPLES
--------
AutoCLI -frd -w -n -b -q2 -m -k -l -lfb -lc50 600
Opens a Shell window with automatic full size minus 1 pixel.
Enables 20 function keys with RIGHT AMIGA as the qualifier for the
second 10. Selects the LEFT AMIGA as your qualifier. Enables the
window to front option. Enables the screen shuffle option.
Enables the window shuffle option. Enables pointer lock. Enables
auto window activation. Enables mouse blanking. Enables mouse
acceleration at the second rate. Enables screen blanking after
10 mins of non use, with 50 spline patterning lines, using 4
colours in fast mode.
AutoCLI -f -w0 -n -m -k -l -r -s 600 newshell newcon:0/10/640/150/MyShell
Opens a Shell window with a title of 'MyShell', enables function
keys, selects the RIGHT SHIFT (-r -s) as your qualifier and right
Amiga as the second qualifier (-f), enables the window to front
option ,enables the screen shuffle option, enables the window shuffle,
enables pointer lock, enables auto activation, and will blank the
screen after 10 mins of non use).
AutoCLI -f -w0 -q2 YourProg
Runs a file called YourProg. When LEFT AMIGA/ESCAPE is pressed
enables function keys, window to front and will disable the screen
blanking (ie. no time given), and will accellerate the mouse by
a factor of 4.
AutoCLI remove
Attempts to remove the currently running version from memory
and displays a success or failure message).
REQUIREMENTS
------------
The following commands MUST be available in the current C: directory :-
run ; c directory (called by the DOS Execute function)
newcli ; c directory (called by AutoCLI if NEWCON not available)
newshell ; c directory (called by AutoCLI if NEWCON is available)
shell-seg ; l directory (needed if NEWCON: is mounted)
AutoCLI ; c directory or current directory when launched.
The following commands, devices, files are optional :-
cli-startup ; s directory (script executed by Newcli)
shell-startup ; s directory (script executed by NewShell)
NEWCON: ; (must be mounted to enable Shell instead of CLI)
AutoCLI.f1 ; s directory (script file for qualifier/F1)
AutoCLI.f2 ; s directory (script file for qualifier/F2)
...etc.
AutoCLI.e1 ; s directory (script file for 2nd qualifier/F1)
AutoCLI.e2 ; s directory (script file for 2nd qualifier/F2)
...etc.
NOTE: 'Amiga' is a Trademark of Commodore Amiga Inc.
The idea for Pointer Lock came from a program 'Tame Pointer' by JOHN ROWE,
a very close and talented friend of mine who has written some wonderful
programs for the Amiga in Lattice C.